package com.fy56.platform.logistics.vo;

import java.io.Serializable;
import java.util.LinkedHashMap;
import java.util.Map;


/**
 * [输入参数类]订单物流通知
 */
public class OrderLogisticsNoticeVo implements Serializable {
    /**
     * 微信-小程序_唯一id
     */
    private String appId;
    /**
     * vip用户手机号
     */
    private String vipNumber;
    /**
     * 微信小程序-消息模板id, 默认:公版(IqTvf02gHVuw4aos2HnmDVMtEsgYUcRXaLhmI99ZkbM)
     */
    private String templateId;
    /**
     * 通知类型[1订单下单,2订单转正,3订单已发车,4订单已到达,5订单已完成]
     */
    private String noticeType;
    /**
     * 承运物流名称
     */
    private String receiveCompany;
    /**
     * 通知时间
     */
    private String noticeTime;
    /**
     * 运单号
     */
    private String orderNumber;
    /**
     * 货物详情
     */
    private String remarks;

    /**
     * 模板卡片_跳转页面
     * 默认:
     * {仅限本小程序内的页面。支持带参数,（示例index?foo=bar）。该字段填"-1"则模板无跳转}
     */
    private String page;

    /**
     * openId
     * @return
     */
    private String openId;

    /**
     * 货物详情
     */
    private String cargoDetails;

    public String getCargoDetails() {
        return cargoDetails;
    }

    public void setCargoDetails(String cargoDetails) {
        this.cargoDetails = cargoDetails;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }
    /*----------------------------------------------------------------------------------------------------*/

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getVipNumber() {
        return vipNumber;
    }

    public void setVipNumber(String vipNumber) {
        this.vipNumber = vipNumber;
    }

    public String getTemplateId() {
        return templateId;
    }

    public void setTemplateId(String templateId) {
        this.templateId = templateId;
    }

    public String getNoticeType() {
        return noticeType;
    }

    public void setNoticeType(String noticeType) {
        this.noticeType = noticeType;
    }

    public String getReceiveCompany() {
        return receiveCompany;
    }

    public void setReceiveCompany(String receiveCompany) {
        this.receiveCompany = receiveCompany;
    }

    public String getNoticeTime() {
        return noticeTime;
    }

    public void setNoticeTime(String noticeTime) {
        this.noticeTime = noticeTime;
    }

    public String getOrderNumber() {
        return orderNumber;
    }

    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getPage() {
        return page;
    }

    public void setPage(String page) {
        this.page = page;
    }

    /*----------------------------------------------------------------------------------------------------*/

    /**
     * [拼装]订单物流通知-模板内容
     * @return
     */
    public Map<String, Object> getInputData(){
        Map<String, String> noticeTypeMap = new LinkedHashMap<>();
        noticeTypeMap.put("1","订单下单");
        noticeTypeMap.put("2","订单转正");
        noticeTypeMap.put("3","订单已发车");
        noticeTypeMap.put("4","订单已到达");
        noticeTypeMap.put("5","订单已完成");

        Map<String, Object> retMap = new LinkedHashMap<>();
        retMap.put("name8", getReceiveCompany());//承运物流名称
        retMap.put("time2", getNoticeTime());//通知时间
        retMap.put("character_string10", getOrderNumber());//运单号
        retMap.put("thing18", getRemarks());//货物详情
        retMap.put("phrase3", noticeTypeMap.get(getNoticeType()));//状态

        return retMap;
    }

    /**
     * [拼装]订单物流通知-汇隆
     * @return
     */
    public Map<String, Object> getInputDataHuiLong(){
        Map<String, String> noticeTypeMap = new LinkedHashMap<>();
        noticeTypeMap.put("1","订单下单");
        noticeTypeMap.put("2","订单转正");
        noticeTypeMap.put("3","订单已发车");
        noticeTypeMap.put("4","订单已到达");
        noticeTypeMap.put("5","订单已完成");

        Map<String, Object> retMap = new LinkedHashMap<>();
        retMap.put("character_string1", getOrderNumber());//运单号
        retMap.put("time2", getNoticeTime());//通知时间
        retMap.put("phrase3", noticeTypeMap.get(getNoticeType()));//状态
        retMap.put("thing18", getCargoDetails());//货物详情
        retMap.put("thing16",getRemarks() );//备注

        return retMap;
    }
}
